package ch.exploadingelephants.model;

import java.util.List;

import android.content.res.Resources;
import android.graphics.Bitmap;
import ch.exploadingelephants.graph.ConveyorToken;
import ch.exploadingelephants.graph.Token;

/**
 * @author Sandro De Zanet
 * 
 */
public class ConveyorBeltItem extends MachineItem {

    private final ConveyorDirection direction;

    /**
     * @param view
     */
    public ConveyorBeltItem(ConveyorDirection direction) {
	this.direction = direction;
    }

    /*
     * (non-Javadoc)
     * 
     * @see ch.exploadingelephants.model.MachineItem#getBitmap()
     */
    @Override
    public List<Bitmap> getBitmaps(Resources resources) {
	return loadBitmaps(direction.getResourceIDs(), resources);
    }

    /*
     * (non-Javadoc)
     * 
     * @see ch.exploadingelephants.model.MachineItem#createGraphObject()
     */
    @Override
    public Token createGraphObject() {
	return new ConveyorToken(this.direction);
    }

    /*
     * (non-Javadoc)
     * 
     * @see ch.exploadingelephants.model.MachineItem#copyItem()
     */
    @Override
    public MachineItem copyItem() {
	return new ConveyorBeltItem(direction);
    }

}
